import Taro, { Component } from '@tarojs/taro'
import {Swiper, SwiperItem, Image} from '@tarojs/components'
import './index.less'

export default class IndexBanner extends Component{
  constructor(props) {
    super(props)
  }
  render () {
    const swiperItems = this.props.data.map((item, index) => {
      return (
          <SwiperItem key={index} itemId={item.id} >
            <Image src={item.img}  />
          </SwiperItem>
      )
    })

    return (
      <Swiper className='swiper' indicatorColor='#999' indicatorActiveColor='#333'  circular indicatorDots autoplay>
          {swiperItems}
      </Swiper>
    )
  }
}

